Back to Article
Semivariograms
Download Source

Semivariograms

Alex Koiter

Load libraries

In [1]:
suppressPackageStartupMessages({
  library(tidyverse)
  library(readODS)
  library(gt)
})
Warning: package 'readODS' was built under R version 4.4.3

Data

In [2]:
vario <- read_ods(here::here("./notebooks/semivariogram.ods")) %>%
  mutate(sill = p_sill + nugget, 
         `C/(C + Co) (%)` = 100 * p_sill/sill,
         `Spatial Class` = case_when(`C/(C + Co) (%)` > 75 ~ "Strong",
                           `C/(C + Co) (%)`<=75 & `C/(C + Co) (%)` >25 ~ "Moderate",
                           `C/(C + Co) (%)` < 0.25 ~ "Low")) %>%
  select("Property" = "property", "Kriging Type" = "model", "Nugget (Co)" = "nugget", "Sill (Co + C)" = "sill", "C/(C + Co) (%)", "Range (m)" = "range", "site", "r2", "Spatial Class") %>%
  #select(-p_sill) %>%
  mutate(Property = fct_relevel(Property, "Ca", "Co", "Cs", "Fe", "Li", "La", "Nb", "Ni", "Rb", "Sr", "a*", "b*", "c*", "h*", "x")) %>%
  arrange(Property)
In [3]:
In [4]:
vario |>
  group_by(site) |>
  gt() |>
  fmt_number(decimal = 1) |>
  fmt_number(columns = c("Range (m)", "C/(C + Co) (%)"), decimal = 0) |>
  cols_label(r2 = "{{r^2}}") |>
  tab_footnote(
    footnote = "Models are all isotropic.",
    locations = cells_column_labels(columns = "Kriging Type"))  |>
  tab_footnote(
    footnote = "Strong spatial dependency (C/(C + Co) % >75); Moderate spatial dependency (C/(C + Co) % between 75 and 25); Low spatial dependency (C/(C + Co) % <25).",
    locations = cells_column_labels(columns = `Spatial Class`))  |>
  tab_style(style =  cell_text(weight = "bold", align = "center"), locations =  cells_row_groups()) |>
  tab_options(column_labels.font.weight = "bold")
Table 1: Geostatistical parameters of the fitted semivariogram models of selected colour and geochemical properties within the agricultural and forested sites.
Property Kriging Type1 Nugget (Co) Sill (Co + C) C/(C + Co) (%) Range (m) r2 Spatial Class2
Agriculture
Ca Universal 0.0 7.2 100 580 0.9 Strong
Co Simple 0.0 0.7 100 208 0.4 Strong
Cs Ordinary 0.0 0.0 100 210 0.5 Strong
Fe Ordinary 0.0 0.0 100 185 0.2 Strong
Li Universal 0.3 1.5 81 185 0.6 Strong
La Simple 0.4 1.0 56 308 0.5 Moderate
Nb Universal 0.0 0.0 91 210 0.7 Strong
Ni Ordinary 1.4 8.9 84 352 0.6 Strong
Rb Ordinary 1.4 27.6 95 551 0.9 Strong
Sr Ordinary 0.9 900.2 100 220 1.0 Strong
a* Ordinary 0.4 1.0 59 288 0.3 Moderate
b* Simple 0.2 0.9 83 199 0.3 Strong
c* Simple 0.1 0.9 87 199 0.3 Strong
h* Simple 0.0 1.1 100 185 0.2 Strong
x Simple 0.4 1.0 58 220 0.1 Moderate
Forest
Ca Ordinary 1.6 2.7 41 269 0.2 Moderate
Co Ordinary 0.0 2.1 100 298 0.1 Strong
Cs Ordinary 0.0 0.0 83 237 0.2 Strong
Li Ordinary 0.0 0.8 100 222 0.3 Strong
La Ordinary 3.1 7.4 59 176 0.1 Moderate
Nb Ordinary 0.0 0.0 51 224 0.2 Moderate
Ni Universal 6.7 15.8 57 187 0.2 Moderate
Sr Simple 0.4 1.0 65 229 0.4 Moderate
h* Universal 0.0 0.0 100 230 0.3 Strong
1 Models are all isotropic.
2 Strong spatial dependency (C/(C + Co) % >75); Moderate spatial dependency (C/(C + Co) % between 75 and 25); Low spatial dependency (C/(C + Co) % <25).